wpf binding ancestor codebehind

52

wpf binding ancestor codebehind -

      Binding b = new Binding();

      b.RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor,this.GetType(),1);

      b.Path = new PropertyPath("MyDP");

      MyLable.SetBinding(ContentProperty, b);

Comments

Submit
0 Comments